package com.gao.client;

import com.gao.builder.GrassHouseBuilder;
import com.gao.builder.HouseBuilder;
import com.gao.builder.StoneHouseBuilder;
import com.gao.builder.WoodenHouseBuilder;
import com.gao.director.HouseDirector;
import com.gao.domain.House;

/**
 * @author GaoXi
 * @date 2021/5/19 20:20
 */
public class Client {

    public static void main(String[] args) {
        HouseDirector houseDirector = new HouseDirector();

        //我想要个草房子
        HouseBuilder houseBuilder = new GrassHouseBuilder();
        House grassHouse = houseDirector.constructHouse(houseBuilder);

        //木头房子
        houseBuilder = new WoodenHouseBuilder();
        House woodenHouse = houseDirector.constructHouse(houseBuilder);

        //石头房子
        houseBuilder = new StoneHouseBuilder();
        House stoneHouse = houseDirector.constructHouse(houseBuilder);
    }

}
